home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Misc / Crossword / Source / Crossword.h < prev    next >
Text File  |  1993-04-13  |  1KB  |  64 lines

  1. /*
  2.  
  3. File Crossword.h
  4.  
  5. A crossword is a matrix of squares.  The user can adjust the squares that are empty and filled using the mouse.  When resized, a crossword automatically adjusts the number of squares in the frame to match.  It is possible to extract the words from a crossword with the -getWords method.
  6.  
  7. */
  8.  
  9. #import <appkit/Matrix.h>
  10.  
  11. #import "CrosswordSquare.h"
  12.  
  13.  
  14. /* ————————————————————————————————————————————————————————————————————————————  */
  15.  
  16.  
  17. #define DEFAULTSQUAREWIDTH        19
  18. #define INTERCELLWIDTH            1
  19.  
  20.  
  21. /* ————————————————————————————————————————————————————————————————————————————  */
  22.  
  23.  
  24. @interface Crossword:Matrix
  25. {
  26.     float        squareWidth;
  27.     id            inspector;
  28.     BOOL        fill;
  29.     BOOL        numbered;
  30. }
  31.  
  32. - (float) getSquareWidth;
  33. - (BOOL) getFill;
  34. - (BOOL) getNumbered;
  35. - getInspector;
  36. - setInspector: (id) theInspector;
  37. - initFrame: (NXRect *) frameRect;
  38. - initFrame: (NXRect *) frameRect  squareWidth: (float) squareSize;
  39. - write: (NXTypedStream *) stream;
  40. - read: (NXTypedStream *) stream;
  41. - superviewSizeChanged: (NXSize *) old;
  42. - changeFont: sender;
  43. - print: sender;
  44. - mouseDown: (NXEvent *) event;
  45. - (BOOL) acceptsFirstMouse;
  46. - clear: (squareColor) color;
  47. - putLetter: (char) letter  inSquare: (id) square;
  48. - number;
  49. - unnumber;
  50. - getWords;
  51.  
  52. @end
  53.  
  54.  
  55. /* ————————————————————————————————————————————————————————————————————————————  */
  56.  
  57.  
  58. @interface anInspector:Object
  59. {
  60. }
  61.  
  62. - update: sender;
  63.  
  64. @end